﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="Categories.aspx.cs" Inherits="TCV_WEB.Admin.Page.Categories" Title="Untitled Page" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlacebody" runat="server">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
            <td>
                <table cellpadding="0" cellspacing="6" border="0" class="tableForm" id="tblManagePartner">
                    <tr>
                        <td colspan="5" align="center" class="formTitle">
                            Danh mục
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5">
                            <div id="divError">
                                <asp:Label ID="lblErr" runat="server" CssClass="errorText"></asp:Label>
                                <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                                </telerik:RadScriptManager>
                               <%-- <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
                                    <AjaxSettings>
                                        <telerik:AjaxSetting AjaxControlID="radtree">
                                            <UpdatedControls>
                                                <telerik:AjaxUpdatedControl ControlID="txtproductType"></telerik:AjaxUpdatedControl>
                                            </UpdatedControls>
                                        </telerik:AjaxSetting>
                                    </AjaxSettings>
                                </telerik:RadAjaxManager>--%>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%; height: 28px;">
                        </td>
                        <td style="width: 25%; height: 28px;">
                            Tên
                        </td>
                        <td style="width: 20px; height: 28px;">
                        </td>
                        <td style="height: 28px">
                            <asp:TextBox ID="txtproductType" runat="server" Width="70%"></asp:TextBox>
                        </td>
                        <td style="width: 20%" rowspan="10" align="left" valign="top">
                            <br />
                            <br />
                            <br />
                            <br />
                            <asp:Panel ID="Panel1" runat="server" Height="400px" ScrollBars="Auto" 
                                Width="100%">
                                <telerik:RadTreeView ID="radtree" runat="server" 
    OnNodeClick="radtree_NodeClick">
                                    <DataBindings>
                                        <telerik:RadTreeNodeBinding Expanded="true" />
                                    </DataBindings>
                                </telerik:RadTreeView>
                            </asp:Panel>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%; height: 28px;">
                            &nbsp;
                        </td>
                        <td style="width: 25%; height: 28px;">
                            Tên VN
                        </td>
                        <td style="width: 20px; height: 28px;">
                            &nbsp;
                        </td>
                        <td style="height: 28px">
                            <asp:TextBox ID="txtNameVN" runat="server" Width="70%"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%">
                            &nbsp;
                        </td>
                        <td>
                            Ảnh
                        </td>
                        <td style="width: 20px">
                            &nbsp;
                        </td>
                        <td>
                            <asp:FileUpload ID="fulImage" runat="server" />
                            <asp:Button ID="btnUpload" runat="server" Text="Tải File" OnClick="btnUpload_Click"
                                Height="22px" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td style="width: 20px">
                            &nbsp;</td>
                        <td>
                            <asp:Image ID="img" runat="server" Width="80px" Height="80px" 
                                ImageUrl="145px" />
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%">
                        </td>
                        <td>
                            Tình trạng
                        </td>
                        <td style="width: 20px">
                        </td>
                        <td>
                            <asp:RadioButtonList ID="rblIsViewed" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Selected="True" Value="1">Dùng</asp:ListItem>
                                <asp:ListItem Value="0">Không dùng</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%">
                            &nbsp;
                        </td>
                        <td>
                            Rank
                        </td>
                        <td style="width: 20px">
                            &nbsp;
                        </td>
                        <td>
                            <asp:TextBox ID="txtRank" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%">
                            &nbsp;
                        </td>
                        <td>
                            Mục cha
                        </td>
                        <td style="width: 20px">
                            &nbsp;
                        </td>
                        <td>
                            <telerik:RadComboBox ID="ddlCategoryParent" runat="server" Filter="Contains" ExpandDirection="Up">
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%">
                            &nbsp;
                        </td>
                        <td>
                            Loại
                        </td>
                        <td style="width: 20px">
                            &nbsp;
                        </td>
                        <td>
                            <telerik:RadComboBox ID="radcbbType" runat="server" EmptyMessage="Chọn 1 loại">
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 5%">
                            &nbsp;
                        </td>
                        <td align="left" valign="top">
                            Diễn giải
                        </td>
                        <td style="width: 20px">
                            &nbsp;
                        </td>
                        <td>
                            <asp:TextBox ID="txtDecribes" runat="server" Height="100px" TextMode="MultiLine"
                                Width="276px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <div style="margin: auto; width: 201px">
                    <asp:Button ID="btnAddNew" runat="server" Text="Thêm mới" OnClick="btnAddNew_Click" />
                    &nbsp;
                    <asp:Button ID="btnSave" runat="server" Text="Lưu" OnClick="btnSave_Click" />
                    &nbsp;
                    <asp:Button ID="btnDelete" runat="server" Text="Xóa" OnClick="btnDelete_Click" 
                        Visible="False" />
                </div>
            </td>
        </tr>
        <tr>
            <td style="height: 18px">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
                <asp:TextBox Visible="false" ID="txtProductTypeID" runat="server"></asp:TextBox>
                <asp:TextBox Visible="false" ID="txtImage" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:TreeView ID="tvControl" runat="server" ImageSet="BulletedList4" ExpandDepth="0"
                    OnSelectedNodeChanged="tvControl_SelectedNodeChanged" OnTreeNodeCheckChanged="tvControl_TreeNodeCheckChanged"
                    OnTreeNodeCollapsed="tvControl_TreeNodeCollapsed" OnTreeNodeExpanded="tvControl_TreeNodeExpanded"
                    OnTreeNodePopulate="tvControl_TreeNodePopulate" ShowExpandCollapse="True" CssClass="idTree"
                    Visible="False">
                    <ParentNodeStyle Font-Bold="False" />
                    <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
                    <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
                        VerticalPadding="0px" />
                    <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px"
                        NodeSpacing="0px" VerticalPadding="0px" />
                </asp:TreeView>
                <br />
                <telerik:RadGrid ID="dgvList" runat="server" AutoGenerateColumns="False" GridLines="None"
                    Skin="Office2007" AllowSorting="True" OnItemCommand="dgvList_ItemCommand" OnItemCreated="dgvList_ItemCreated"
                    OnNeedDataSource="dgvList_NeedDataSource" ShowGroupPanel="True" AllowMultiRowSelection="True"
                    AllowFilteringByColumn="True" AllowPaging="True">
                    <MasterTableView DataKeyNames="ID">
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="column6" Visible="False">
                                <ItemStyle Width="20px"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn CommandName="Load" Text="Sửa" UniqueName="column8">
                            </telerik:GridButtonColumn>
                            <telerik:GridBoundColumn DataField="Rank" HeaderText="STT" UniqueName="column7">
                                <ItemStyle Width="20px"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Name" HeaderText="Tên" UniqueName="column1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="NameVN" HeaderText="Tên VN" UniqueName="column2">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ParentName" HeaderText="Mục cha" UniqueName="column5">
                            </telerik:GridBoundColumn>
                            <telerik:GridImageColumn DataImageUrlFields="Image" ImageHeight="80px" ImageWidth="80px"
                                UniqueName="colImage" DataImageUrlFormatString="~/Uploads/Image/{0}">
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="80px" Height="80px" />
                            </telerik:GridImageColumn>
                            <telerik:GridBoundColumn DataField="Decribes" HeaderText="Diễn giải" UniqueName="column3">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="IDStatus" HeaderText="Tình trạng" UniqueName="column4">
                                <ItemStyle Width="20px"></ItemStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn CommandName="Detail" Text="Chi tiết" UniqueName="column">
                            </telerik:GridButtonColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings AllowDragToGroup="True">
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                </telerik:RadGrid>
            </td>
        </tr>
        <tr>
            <td align="center" style="padding-bottom: 20px">
            </td>
        </tr>
        <tr>
            <td>
            </td>
        </tr>
    </table>

    <script language="javascript" type="text/javascript">
    function validform(){    
	if(ValidateForm('tblManagePartner','divError','ctl00_ContentPlacebody_')==false)  return false;	
	if(ValidateWebAddress('ctl00_ContentPlacebody_txtLinkPartner','divError')==false)  return false;
	return true;
} 
    </script>

</asp:Content>
